import React from 'react';
import './index.css';
import Model from '../';
import { formateDateTime } from '../../../libs/util'

function CheckModel (props){
    const { isShowCheckModel, data, closeModel } = props;
    return(
       <Model 
       isModelShow = { isShowCheckModel }
       modelTitle = '查看事件'
       >
        <p className="topic">时间：{ formateDateTime(data.id) }</p>
        <p className="topic">内容：{ data.content }</p>
        <p className="topic">状态：{ data.completed ? '已完成' : '未完成' }</p>

        <button 
        className="button is-success my-close-btn"
        onClick={ closeModel }
        >确定</button>
       </Model>
    );
}

export default CheckModel;